#include <iostream>
using namespace std;

int main()
{
  int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

  cout << "第一个元素为：" << arr[0] << endl;

  int *p = arr; // arr就是数组的首地址

  cout << "用指针访问第一个元素：" << *p << endl;

  for (int i = 0; i < 9; i++)
  {
    p++;
    cout << "让指针向后偏移一个地址：" << *p << endl;
  }

  return 0;
}